﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<t_205_verk_hopur_12.Models.OwnerChannelsViewModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	<%= Html.Encode(Model.User.Username) %>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="LogoText" runat="server">
</asp:Content>
   
<asp:Content ID="Content4" ContentPlaceHolderID="MenuBar" runat="server">
    <% Html.RenderPartial("MenuBar"); %>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div id="info">
        <h2>Notandaupplýsingar</h2>
            <div class="display-label">Notendanafn:</div>
            <div class="display-field"><%= Html.Encode(Model.User.Username) %></div>
            <div class="clear"></div>
            
            <div class="display-label">Lykilorð:</div>
            <div class="display-field"><%= Html.Encode(Model.User.Password) %></div>
            <div class="clear"></div>
            
            <div class="display-label">Tölvupóstur:</div>
            <div class="display-field"><%= Html.Encode(Model.User.Email) %></div>
            <div class="clear"></div>
            
            <div class="display-label">Aldur:</div>
            <div class="display-field"><%= Html.Encode(Model.User.Age) %></div>
            <div class="clear"></div>
            
            <div class="display-label">Kyn:</div>
            <div class="display-field">
                <% if (Model.User.Gender == true)
                   {
                       %>
                       <%=Html.Encode("Karl") %>
                       <%
                   }
                   else
                   {
                       %>
                       <%=Html.Encode("Kona") %>
                       <%
                   }
                %>
            </div>
        </div>
        <div id="sub">
            <% if (Model.ownedChannels.Count() > 0)
               { %>
            <h2>Stöðvarstjóri</h2>
            <ol>
                <%foreach (var channel in Model.ownedChannels)
                  { %>
                    <li>
                         <%= Html.ActionLink(channel.Name, "Index", "Channel", new { id = channel.ID }, null)%>
                    </li>
                <% } %>
            </ol>
            <% } %>
        </div>

        <div id="Employee">
            <% if (Model.employeeAtChannels.Count() > 0)
               { %>
            <h2>Er starfsmaður hjá</h2>
            <ol>
                <%foreach (var channel in Model.employeeAtChannels)
                  { %>
                    <li>
                         <%= Html.ActionLink(channel.Name, "Index", "Channel", new { id = channel.ID }, null)%>
                    </li>
                <% } %>
            </ol>
            <% } %>
        </div>

        <div id="Subscriptions">
            <% if (Model.subscribedChannels.Count() > 0)
               { %>
            <h2>Er áskrifandi að</h2>
            <ol>
                <%foreach (var channel in Model.subscribedChannels)
                  { %>
                    <li>
                         <%= Html.ActionLink(channel.Name, "Index", "Channel", new { id = channel.ID }, null)%>
                    </li>
                <% } %>
            </ol>
            <% } %>
        </div>

        <div class="clear"></div>

        <div class="clear"></div>
        
        <p>
            <img src="/Content/Icons/pencil.png" alt="Edit" />
            <%= Html.ActionLink("Breyta", "Edit", new { id = Model.User.ID})%>
        </p>
</asp:Content>

